package se19team1e.search;

import java.util.List;
import java.util.Map;


/**
 * An abstraction of a search engine, to be referenced by the controllers. 
 * 
 * @author Arun Manivannan
 *
 */
public interface SearchEngine<T,E> {

    /**
     * Submits the new values to the search engine.
     * @param jobAdvert JobAdvert to submit.
     */
	public void addToIndex(T searchObject);
    
    /**
     * Submits the updated values to the search engine.
     * @param jobAdvert JobAdvert to submit.
     */
    public void updateIndex(T searchObject );

    /**
     * Removes the values from the search engine.
     * @param jobAdvert JobAdvert to remove.
     */
    public void removeFromIndex(T searchObject );
    
    /**
     * Retreives from the search engine
     * @param criteria String of criteria
     * @param filters  
     */
    public List<T> search(String criteria, Map<String,String> filters);

    /**
     * Reconstructs index from the source
     */
    public void refreshIndex();
    
}
